import request from '@/utils/request'

export default {
  market(dateStart, dateEnd) {
    return request({
      url: '/corp-marketstat',
      method: 'get',
      params: {
        statisticsBegin: dateStart,
        statisticsEnd: dateEnd
      }
    }).then(response => response.data)
  }
}
//获取登录菜单
export function getMenusList(data) {
  return request({
    url: '/menu',
    method: 'get',
    headers: {
      'Content-Type': 'application/json; charset=UTF-8'
    },
    params: data
  })
}
//添加菜单
export function create(data) {
  return request({
    url: '/menu/create',
    method: 'post',
    data
  })
}
//删除菜单
export function deMenu(data) {
  return request({
    url: '/menu/delete',
    method: 'post',
    data
  })
}
//更改菜单状态
export function setStatus(data) {
  return request({
    url: '/menu/status',
    method: 'post',
    data
  })
}
//获取菜单按钮数据
export function getData(data) {
  return request({
    url: '/menu/detail',
    method: 'get',
    params: data
  })
}
//更新菜单按钮数据
export function setData(data) {
  return request({
    url: '/menu/update',
    method: 'post',
    data
  })
}
//角色管理列表
export function getMenuRole(params) {
  return request({
    url: '/menu/role',
    method: 'get',
    params
  })
}
//角色管理保存
export function setMenuRole(data) {
  return request({
    url: '/menu/set-role',
    method: 'post',
    data
  })
}
//菜单用户管理列表
export function getMenuUser(params) {
  return request({
    url: '/menu/user',
    method: 'get',
    params
  })
}
//菜单更新账户自定义用户
export function setMenuUser(data) {
  return request({
    url: '/menu/set-user',
    method: 'post',
    data
  })
}


